package com.example.mqtt.service

import com.example.mqtt.MqttApp
import com.example.mqtt.domain.RecordChangeData
import lombok.extern.slf4j.Slf4j
import org.junit.Test

import org.junit.Assert.*
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.context.annotation.Import
import org.springframework.data.redis.core.RedisTemplate
import org.springframework.data.redis.core.StringRedisTemplate
import org.springframework.test.context.junit4.SpringRunner
import java.util.*
import javax.annotation.Resource

@RunWith(SpringRunner::class)
@SpringBootTest
@Import(MqttApp::class)
class RecordChangeDataServiceTest {

    @Autowired
    lateinit var recordChangeDataService :RecordChangeDataService;
    @Autowired
    lateinit var redisTemplate: StringRedisTemplate

    @Test
    fun saveRecordChangeData() {
       var recordChangeData = RecordChangeData()
        recordChangeData.mcuId = "1234567"
        recordChangeDataService.saveRecordChangeData(recordChangeData)

    }
}